<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script type="text/javascript">
        //2.带参(形参)
        //undefined:变量声明了但没有赋值
        //null:变量声明，并且有个空引用

        //...args:剩余运算符,将剩下的参数都放进args数组中
        function fn(A,B,...args){
            //arguments:伪数组
            // for (let index = 0; index < arguments.length; index++) {
            //     console.log(arguments[index]);
            // }

            console.log(A);
            console.log(B);
            console.log(args);
            
            

        }

        var a = 4; //everyone makes mistakes  
        fn(1,2,3,4,5,6,7,8,9);


    </script>
</body>
</html>